package com.kqb.controller;

import com.kqb.common.controller.base.BaseController;
import com.kqb.common.domain.AjaxResult;
import com.kqb.pojo.Products;
import com.kqb.service.ProductManagementService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Api(tags = "产品管理")
@RequestMapping("/api/ProductManage")
public class ProductManagementController extends BaseController {

    @Autowired
    ProductManagementService PMS;

    @PostMapping
    @ApiOperation("查询所有产品")
    public AjaxResult selectAllProducts(@RequestBody Products products){
        List<Products> list = PMS.selectAllProducts(products);
        return success("查询成功",list);
    }




}
